<?php
include_once('_lib/class.quickskin.php');
include_once('_lib/class.user.php');
include_once('_lib/class.db.php');

$jsonpage = new QuickSkin('tpl/json.html');
$jsonpage -> assign('title' , 'Json Page');

/**获取数据**/
$sql = "select * from user";
$hornbillDb -> connect();
$result = $hornbillDb -> query($sql);
$userArr = array();
$i=0;
while($temp = $hornbillDb->assocResult($result)){
	$temp["color"] = $i%2;
	array_push($userArr , $temp);
	$i++;
}
$jsonpage->assign( 'gray' , "#DDDDDD");

$jsonpage -> assign('users' , $userArr);
$jsonpage -> output();
?>